﻿using System;

using NUnit.Framework;

using octalforty.Syndication.Core;

namespace octalforty.Syndication.UnitTests.Core
{
    /// <summary>
    /// <see cref="SyndicationFeed"/> unit tests.
    /// </summary>
    [TestFixture()]
    public class SyndicationFeedTestFixture
    {
        [Test()]
        public void NoArgumentConstructor()
        {
            ISyndicationFeed syndicationFeed = new SyndicationFeed();

            Assert.IsNull(syndicationFeed.Author);
            Assert.IsNull(syndicationFeed.Contributor);
            Assert.IsEmpty(syndicationFeed.Copyright);
            Assert.IsEmpty(syndicationFeed.Description);
            Assert.IsEmpty(syndicationFeed.Items);
            Assert.IsEmpty(syndicationFeed.Link);
            Assert.IsNull(syndicationFeed.ManagingEditor);
            Assert.IsTrue(DateTime.Now.Subtract(syndicationFeed.PublishedOn.Value).TotalSeconds < 1);
            Assert.IsEmpty(syndicationFeed.Title);
            Assert.IsEmpty(syndicationFeed.UniqueIdentifier);
            Assert.IsTrue(DateTime.Now.Subtract(syndicationFeed.UpdatedOn.Value).TotalSeconds < 1);
            Assert.IsNull(syndicationFeed.WebMaster);
        }
    }
}
